package org.zhadoop.stream.cql.semanticanalyzer.parser.visitor;

import org.zhadoop.stream.cql.semanticanalyzer.parser.CQLParser.ExpressionContext;
import org.zhadoop.stream.cql.semanticanalyzer.parser.context.ExpressionPreviousContext;

/**
 * previous表达式遍历
 * @author zwd
 *
 */
public class ExpressionPreviousVisitor extends AbsCQLParserBaseVisitor<ExpressionPreviousContext>{

	
	private ExpressionPreviousContext context = null;
	
	public ExpressionPreviousVisitor() {
		context = new ExpressionPreviousContext();
	}
	
	@Override
	protected ExpressionPreviousContext defaultResult() {
		return context;
	}
	
	@Override
	public ExpressionPreviousContext visitExpression(ExpressionContext ctx) {
		ExpressionVisitor visitor = new ExpressionVisitor();
        context.getExpressions().add(visitor.visit(ctx));
        return context;
	}

}
